import ReactDOM from 'react-dom';
import App from './App';
import './static/reset.css'
import { QueryClientProvider, QueryClient, QueryClientConfig } from "react-query";

const config = new QueryClient({
  defaultOptions: {
    queries: {
      refetchOnWindowFocus: true, // 窗口重新获得焦点时重新获取数据 默认 true
      staleTime: 5 * 60 * 1000, // 重新获取数据的时间间隔 默认0
      retry: 0  // 失败重试次数 默认 3次
    }
  }
})

ReactDOM.render(
  <QueryClientProvider client={config}>
    <App />
  </QueryClientProvider>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
// reportWebVitals();
